﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminMasterPage.Master" AutoEventWireup="true" CodeBehind="XuatXMLTheoLop.aspx.cs" Inherits="FITHOU_EDU_Server.xml.XuatXMLTheoLop" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentMain" runat="server">
    <form id="form1" runat="server">
    <div>
        <table border="1px">
            <tr>
                <td>
                    Chọn lớp: 
                    <asp:DropDownList ID="cboLophoc" runat="server">
                    </asp:DropDownList>
                </td>
                <td>
                    <asp:Button ID="btnCreateXMLClass" runat="server" Text="Tạo lịch XML" 
            onclick="btnCreateXMLClass_Click" />
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:Label ID="lblStatus" runat="server" ForeColor="#FF3300"></asp:Label>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:GridView ID="grLich" runat="server" AllowPaging="True" 
                        AutoGenerateColumns="False" DataKeyNames="PK_iLichhocID" 
                        DataSourceID="FITHOU_EDU_LICH" DataMember="DefaultView" CellPadding="3" RowStyle-Width="1" RowStyle-Height="20" PagerStyle-Width="150" BorderWidth="1" BackColor="White">
                        <Columns>
                            <asp:BoundField DataField="PK_iLichhocID" HeaderText="ID" 
                                InsertVisible="False" ReadOnly="True" SortExpression="PK_iLichhocID" />
                            <asp:BoundField DataField="dNgayhoc" HeaderText="Ngày học" 
                                SortExpression="dNgayhoc" />
                            <asp:BoundField DataField="sGiobatdau" HeaderText="Giờ bắt đầu" 
                                SortExpression="sGiobatdau" />
                            <asp:BoundField DataField="sGioketthuc" HeaderText="Giờ kết thúc" 
                                SortExpression="sGioketthuc" />
                            <asp:BoundField DataField="iTrangthai" HeaderText="Trạng thái" 
                                SortExpression="iTrangthai" />
                            <asp:BoundField DataField="sHoten" HeaderText="Giảng viên" 
                                SortExpression="sHoten" />
                            <asp:BoundField DataField="sTenlop" HeaderText="Lớp học" 
                                SortExpression="sTenlop" />
                            <asp:BoundField DataField="sTenphong" HeaderText="Phòng học" 
                                SortExpression="sTenphong" />
                            <asp:BoundField DataField="sTenmonhoc" HeaderText="Môn học" 
                                SortExpression="sTenmonhoc" />
                            
                            
                            
                        </Columns>
                        <SelectedRowStyle BackColor="Silver" />
                    </asp:GridView>
                    <asp:SqlDataSource ID="FITHOU_EDU_LICH" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:FITHOU_EDUConnectionString %>" 
                        SelectCommand="SELECT tbl_Lichhoc.PK_iLichhocID, tbl_Lichhoc.dNgayhoc, tbl_Lichhoc.sGiobatdau, tbl_Lichhoc.sGioketthuc, tbl_Lichhoc.iTrangthai, tbl_Lophoc.sTenlop, tbl_Monhoc.sTenmonhoc, tbl_Phonghoc.sTenphong, tbl_Nguoidung.sHoten FROM tbl_Lichhoc INNER JOIN tbl_Lophoc ON tbl_Lichhoc.FK_iLophocID = tbl_Lophoc.PK_iLophocID INNER JOIN tbl_Monhoc ON tbl_Lichhoc.FK_iMonhocID = tbl_Monhoc.PK_iMonhocID INNER JOIN tbl_Nguoidung ON tbl_Lichhoc.FK_sGiangvienID = tbl_Nguoidung.PK_sNguoidungID INNER JOIN tbl_Phonghoc ON tbl_Lichhoc.FK_iPhonghocID = tbl_Phonghoc.PK_iPhonghocID"></asp:SqlDataSource>
                   <%-- <asp:SqlDataSource ID="FITHOU_EDU_LICH" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:FITHOU_EDUConnectionString %>" 
                        SelectCommand="SELECT * FROM [tbl_Lichhoc] inner join tbl_Lophoc on tbl_Lichhoc.FK_iLophocID = tbl_Lophoc.PK_iLophocID"></asp:SqlDataSource>--%>
                    <asp:SqlDataSource ID="FITHOU_EDU" runat="server" 
                        CancelSelectOnNullParameter="False" 
                        ConnectionString="<%$ ConnectionStrings:FITHOU_EDUConnectionString %>" 
                        ProviderName="<%$ ConnectionStrings:FITHOU_EDUConnectionString.ProviderName %>">
                       
                        
                    </asp:SqlDataSource>
                </td>
            </tr>
        </table>
        
    </div>
    </form>
</asp:Content>
